package com.cwj.vm;

import java.util.ArrayList;
import java.util.List;

/**
 * @author chenwujie
 * @date 2021-02-24 10:21
 */
public class DumpTest {
    private static final int _1MB = 1024 * 1024;

    /**
     * vm options: -XX:+HeapDumpOnOutOfMemoryError -Xms10m -Xmx10m
     * @param args
     */
    public static void main(String[] args) {
        List<byte[]> list = new ArrayList<>();
        while(true){
            byte[] arr = new byte[_1MB];
            list.add(arr);
        }
    }
}
